﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IocCore.CustomerContainer
{
    public class IOCContainerRegistModel
    {
        public Type TargetType { get; set; }
        /// <summary>
        /// 生命周期
        /// </summary>
        public LifetimeType Lifetime { get; set; }
        /// <summary>
        /// 仅限单例
        /// </summary>
        public object? SingletonInstance { get; set; }
    }

    public enum LifetimeType
    {
        // 瞬时
        Transient,
        // 单例
        Singleton,
        // 作用域
        Scope,
        // 线程单例
        PerThread
    }
}
